import fetch from 'common/src/utils/fetch';

function getNewStudentPhoto(data) {
    return fetch({
        url: '/api/studentservice/uploadNewStudentPhoto/getNewStudentPhoto',
        method: 'post',
        data
    });
}

function getNewStudentPhotoProgress(data) {
    return fetch({
        url: '/api/studentservice/uploadNewStudentPhoto/getNewStudentPhotoProgress',
        method: 'post',
        data
    });
}

function getStudentMessage(data) {
    return fetch({
        url: '/api/studentservice/uploadNewStudentPhoto/getStudentMessage',
        method: 'post',
        data
    });
}

// 获取注册学生上传照片总体进度
function getActiveStudentPhotoProgress(data) {
    return fetch({
        url: '/api/studentservice/activeStudent/getActiveStudentPhotoProgress',
        method: 'post',
        data
    });
}
// 查询学生注册上传照片信息
function getActiveStudentPhotos(data) {
    return fetch({
        url: '/api/studentservice/activeStudent/getActiveStudentPhotos',
        method: 'post',
        data
    });
}
// 抓取照片信息
function regStuPhotosCollect(data) {
    return fetch({
        url: '/api/studentservice/activeStudent/regStuPhotosCollect?calendar=' + data.calendar + '&type=' + data.type,
        method: 'get'
    });
}
// 查询注册学期设置
function getActiveCalendarSet(data) {
    return fetch({
        url: '/api/studentservice/activeStudent/getActiveCalendarSet',
        method: 'post',
        data
    });
}
// 设置注册学期
function setActiveCalendar(data) {
    return fetch({
        url: '/api/studentservice/activeStudent/setActiveCalendar',
        method: 'post',
        data
    });
}

const faceIdentifyApi = {
    'getNewStudentPhoto': getNewStudentPhoto,
    'getNewStudentPhotoProgress': getNewStudentPhotoProgress,
    'getStudentMessage': getStudentMessage,
    'getActiveStudentPhotoProgress': getActiveStudentPhotoProgress,
    'getActiveStudentPhotos': getActiveStudentPhotos,
    'regStuPhotosCollect': regStuPhotosCollect,
    'getActiveCalendarSet': getActiveCalendarSet,
    'setActiveCalendar': setActiveCalendar
}

export default faceIdentifyApi;